package com.gxc.healthfood.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 食物营养成分实体类
 * @TableName food_nutrients
 */
@TableName(value ="food_nutrients")
@Data
public class FoodNutrients implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 食物ID
     */
    @TableField(value = "food_id")
    private Long foodId;

    /**
     * 热量(kcal)
     */
    @TableField(value = "calories")
    private BigDecimal calories;

    /**
     * 蛋白质(g)
     */
    @TableField(value = "protein")
    private BigDecimal protein;

    /**
     * 脂肪(g)
     */
    @TableField(value = "fat")
    private BigDecimal fat;

    /**
     * 碳水化合物(g)
     */
    @TableField(value = "carbohydrate")
    private BigDecimal carbohydrate;

    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    private Date createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at")
    private Date updatedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}